﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using TradeCore.Model;
using TradeCore.Quote;
using TradeCore.Trade;

namespace TradeCore
{
    public class CoreManager
    {
        private QuoteManager quoteManager;

        private TradeManager tradeManager;


        /******************************** Public ********************************/

        public CoreManager()
        { 
            quoteManager = QuoteManager.GetInstance();
            tradeManager = TradeManager.GetInstance();
        }

        /// <summary>
        /// 开始获取实时行情
        /// </summary>
        public void StartQuote()
        {
            StartCtpQuote();
        }


        /******************************** Private ********************************/

        private void StartCtpQuote()
        { 
            CtpAccount ctpAccount = new CtpAccount();

            ctpAccount.Market = MarketType.Futures;
            ctpAccount.BrokerID = "4030";
            ctpAccount.Account = "80002863";
            ctpAccount.Password = "888888";

            string[] mdFront = { @"tcp://asp-sim2-md1.financial-trading-platform.com:26213" };
            string[] subscribeInstruments = { "ru1301" };

            CtpQuote ctpQuote = new CtpQuote(ctpAccount, mdFront, subscribeInstruments);
        }

        private void InitPolicy()
        { 
            
        }
    }
}
